# encoding=utf-8
import pandas as pd

#
from run_pandas import get_player_season_data, get_player_history_data, get_player_history_agg, get_player_list


class PlayerService:
    @staticmethod
    def get_player_list():
        # player_list = get_player_list()
        player_list = []
        result_data = {
            'player_list': player_list,
            'count': len(player_list)
        }
        return result_data

    @staticmethod
    def get_season_data(player_name, season_name):
        return get_player_season_data(player_name, season_name)

    @staticmethod
    def get_history_data(player_name):
        year_list = get_player_history_data(player_name)
        result_data = {
            'year_list': year_list,
            'count': len(year_list)
        }
        return result_data

    @staticmethod
    def get_history_agg(player_name):
        return get_player_history_agg(player_name)



